# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
#
# This PKGBUILD was extracted from AUR and adapted to our style
#
# Maintainer: Jenya Sovetkin <e.sovetkin@gmail.com>

pkgname=mkinitcpio-openswap
pkgver=0.1.0
pkgrel=1
pkgdesc='A mkinitcpio hook to open swap at boot time.'
arch=('any')
url='https://aur.archlinux.org/packages/mkinitcpio-openswap'
license=('custom:unknown')
depends=('mkinitcpio')
backup=('etc/openswap.conf')
source=('openswap.hook'
        'openswap.install'
        'openswap.conf')
sha512sums=('2f7d41de73fe0e8887012643ee0d65cc9a48ba8ddec354092f59e2fb7c00badcd3e1168ef0fb1213aeb942ac9de74fc6e3d4a8c993228bf3b947d551cf66c023'
            '53564b62f7b5275274c9c1201b4f63b908aa400e230176d2e24508bec830e294a15bd652c49d118164e179f90e74efbe3a05b92beb6c6785014fe8dc30fc2624'
            '3df8303221a76223300f74fdd42b76bb4d30b265bc4d00e3f6fdc6d5642f53354d15b82584cf9276a77c360276251439dbbfa5b6af5361d267dd3fddb03a5f8c')
install="$pkgname.install"

package() {
  install -Dm 644 openswap.hook "$pkgdir/usr/lib/initcpio/hooks/openswap"
  install -Dm 644 openswap.install "$pkgdir/usr/lib/initcpio/install/openswap"
  install -Dm 644 openswap.conf "$pkgdir/etc/openswap.conf"
}

